export const routes = [
  // 导航
  {
    path: '/Main',
    name: 'Main',
    component: () => import('../views/Main.vue'),
    children: [
      // 首页
      {
        path: 'home',
        name: 'Home',
        component: () => import('../views/Home.vue'),
      },
      // 菜单
      {
        path: 'menu',
        name: 'Menu',
        component: () => import('../views/Menu.vue'),
      },
      // 购物袋
      {
        path: 'shopping',
        name: 'Shopping',
        component: () => import('../views/Shopping.vue'),
      },
      // 我的
      {
        path: 'user',
        name: 'User',
        component: () => import('../views/User.vue'),
      }
    ]
  },
  // 商品详情
  {
    path: '/detail',
    name: 'Detail',
    component: () => import('../views/Detail')
  },
  // 登录注册
  {
    path: '/login',
    name: 'Login',
    alias: '',
    component: () => import('../views/Login.vue')
  },
  // 确认订单
  {
    path: '/settlement',
    name: 'Settlement',
    component: () => import('../views/Settlement')
  },
  // 新增地址编辑地址
  {
    path: '/newAddress/:aid?',
    name: 'NewAddress',
    component: () => import('../views/NewAddress')
  },
  // 个人资料
  {
    path: '/userInfo',
    name: 'UserInfo',
    component: () => import('../views/UserInfo')
  },
  // 我的订单
  {
    path: '/order',
    name: 'Order',
    component: () => import('../views/Order')
  },
  // 我的收藏
  {
    path: '/collection',
    name: 'Collection',
    component: () => import('../views/Collection')
  },
  // 地址管理
  {
    path: '/address',
    name: 'Address',
    component: () => import('../views/Address')
  },
  // 安全中心
  {
    path: '/security',
    name: 'Security',
    component: () => import('../views/Security')
  },
]